var array=['*','##','***','&&','****','##*'];
array[7]='**';
document.write(array.length+'<br/>');
var group=new Array();
for(var i=0;i<array.length;i++){
	if(array[i]==undefined){
		continue;
	}
	for(var j=0;j<array[i].length;j++){
		if(array[i][j]!='*'){
			break;
		}
	}
	if(array[i][j]==undefined){
		group[array[i].length-1]=array[i];
	}
}
var k=0;
while(group[k]!=undefined){
	document.write(group[k]+'<br/>');
	k++;
}
